home *** CD-ROM | disk | FTP | other *** search
- # Jedi Knight Cog Script
- #
- # POW_BACTA.COG
- #
- # POWERUP Script - Bacta tank
- #
- # [YB & CYW]
- #
- # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
-
-
- symbols
-
- thing powerup local
- thing player local
- int bin=15 local
- flex amount local
-
- message activate
- message taken
-
- sound powerupSound=NRGpowerup.wav local
-
- end
-
- # ========================================================================================
-
- code
-
- taken:
- player = getlocalplayerthing();
- amount = GetInv(player, bin);
- powerup = GetSenderRef();
- print("got a health powerup");
- if (amount < GetInvMax(player, bin))
- {
- dwflashinventory();
- playsoundlocal(powerupSound, 1.0, 0.0, 0);
- dwplaycammyspeech(0, "ghca004.wav", 0.1, 1);
- destroything(powerup);
- SetInvAvailable(player,bin,1);
- ChangeInv(player, bin, 1);
- }
- return;
-